import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:meal/components/market/charge_activity.dart';
import 'package:meal/components/market/free_activity.dart';
import 'package:meal/utils/tools.dart';

///
/// 活动详情
///
class MarketActivityInfo extends StatefulWidget {
  const MarketActivityInfo({Key? key}) : super(key: key);

  @override
  State<MarketActivityInfo> createState() => _MarketActivityInfoState();
}

class _MarketActivityInfoState extends State<MarketActivityInfo> {
  bool isFree = true;

  @override
  void initState() {
    super.initState();
    isFree = Get.arguments as bool;
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: ToolsUtils.getDefaultBrnAppBar('活动详情'),
      body: SingleChildScrollView(
        child: isFree ? const FreeActivity() : const ChargeActivity(),
      ),
    );
  }
}
